package fi.internetix.ck;

import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

public class GenericStripNodePrinter extends HTMLNodePrinter {
  
  public GenericStripNodePrinter(boolean processChildren) {
    this.processChildren = processChildren;
  }

  public void processNode(Node node, StringBuilder output) {
    if (processChildren) {
      NodeList children = node.getChildNodes();
      for (int i = 0; i < children.getLength(); i++) {
        NodePrinterUtils.getNodePrinter(children.item(i)).processNode(children.item(i), output);
      }
    }
  }
  
  private boolean processChildren;

}
